/*
 * @Description:增强for循环
 * 
 * @Author: rendc
 * 
 * @Date: 2025-07-24 14:04:50
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2025-07-24 14:09:10
 */

public class Test01 {

  public static void main(String[] args) {
    int[] arr = { 1, 2, 4 };
    for (int i = 0; i < arr.length; i++) {
      System.out.println("arr[" + i + "]:" + arr[i]);
    }
    for (int i : arr) {
      System.out.println("arr:" + i);
    }
    String[] sArr = { "hello", "world", "!" };
    for (String s : sArr) {
      System.out.println(s);
    }
  }
}